import commonjs from '@rollup/plugin-commonjs';
import alias from '@rollup/plugin-alias';

const path = require('path');
const projectRootDir = path.resolve(__dirname);

// rollup.config.js
export default {
    input: 'src/index.js',
    output: {
      file: 'dist/bundle.js',
      format: 'es',
      // name: 'howlong'
    },
    plugins: [
      commonjs(),
      alias({
        entries: [
          { find: 'src', replacement: path.resolve(projectRootDir, 'src') }
        ]
      })
    ],
    external: ['ms']
  };